#pragma once
#include "plane.h"
#include "Point3D.h"

class CTriangle :
	public CPlane
{
public:
	CTriangle(const CPoint3D& p1, const CPoint3D& p2, const CPoint3D& p3);
	~CTriangle(void);
	void SetPoints(const CPoint3D& p1, const CPoint3D& p2, const CPoint3D& p3);
	virtual float Intersect(CRay& ray, CPoint3D& intersection, CPoint3D& normal);

private:
	CPoint3D p1;
	CPoint3D p2;
	CPoint3D p3;
};
